The auto-focus functionality of a digital camera is not always robust. Photographs taken with auto-focus setting can still result in out-of-focus images. For some photos, the entire image is out-of-focus, which may result from the global motion of the camera during capture or from failures of auto-focus function (e.g., when the digital camera failed to find appropriate focus for any part of the image). In some other situations, only part of the image is focused. For example, the digital camera focuses on the background instead of the foreground if the image is not properly focused. In this case, detecting out-of-focus photos is not a trivial task since it involves determining the foreground and the background.
With the advent of digital cameras, taking photographs has become a fun and easier experience. The number of photographs taken each year is growing exponentially, in part due to the low cost and ease of use of digital cameras. Higher numbers of captured photographs require more effort in selecting the photographs for archiving and printing. For example, sorting through tens or even hundreds of photographs taken during a trip to select the photographs to print or save can be a very laborious task. In the selection process, one of the first criteria that the consumer often uses to decide to print a digital photograph is whether it is focused or not.
When the selection process is taken place on a personal computer, the consumer would display the photographs on a CRT monitor or LCD screen and he/she would have to look at the photograph very carefully and often zoom in to see if the image is indeed focused. It becomes an even more difficult process when the consumer would have to determine the sharpness by looking at the display devices where the spatial resolution is limited. For example, it is very difficult to judge whether the photograph is focused or not by viewing it on the small LCD screen that is typically attached to a digital camera or a printer.
There has been research directed toward a similar problem of detecting the sharpness of images. However, these methods have drawbacks that make them ill suited for use in solving the problems described above. In one method, the overall sharpness of an image is measured to determine how much sharpening should be applied to each image. The global sharpness of an image is estimated, which is provided as a single value per image. However, sharpness of an image may not be uniform throughout the image especially when the depth of focus is small such that some parts of the image are blurry while some other parts are sharp. For example, consider an image where the background is sharp and the foreground is blurred. While the image may be classified as sharp by a classifier that examines the overall sharpness of an image, the image would not be well-focused. In general, the sharpness of the foreground determines how well-focused the image is. Thus, this method cannot determine whether the image is properly focused or mistakenly focused on the background. A second method has been developed to segment the main subject and realize the one-third composition rule. To segment the foreground, an additional photo with larger aperture is captured and the difference of the frequency content between the two images taken with different apertures is analyzed. A drawback of this method is that it requires an additional image and that it tries to enforce the one-third composition rule, which may not be applicable in many photographic images. What would be desirable is a technique for providing an indication of how well an image is focused.